package my.design.visitor;

/**
 * @author zp
 * @version 1.0
 * @description: 学生：扩展ranking排名
 * @date 2022/10/22 16:04
 */
public class Student extends User {
    public Student(String name, String identity, String clazz) {
        super(name, identity, clazz);
    }

    @Override
    public void accept(Visitor visitor) {
        visitor.visit(this);
    }

    public int ranking() {
        return (int) (Math.random() * 100);
    }
}
